//1. 安装 redux     npm i  redux
//2. 创建文件  redux/store.js
//3. 引入创建容器的函数  create 创建  store 容器  combine 组合
import {createStore, applyMiddleware, combineReducers} from 'redux';
import thunk from 'redux-thunk';
import zanReducer from './reducers/zanReducer';
import cangReducer from './reducers/cangReducer';
import todoReducer from './reducers/todoReducer';

let rootReducer = combineReducers({
    zan: zanReducer,
    cang: cangReducer,
    todo: todoReducer
})

const store = createStore(rootReducer, applyMiddleware(thunk));


//暴露 store 对象
export default store;


